/*
 ============================================================================
 Name		: SchedulerTimer.h
 Author	  : PSL
 Version	 : 1.0
 Copyright   : Your copyright notice
 Description : CSchedulerTimer declaration
 ============================================================================
 */

#ifndef SCHEDULERTIMER_H
#define SCHEDULERTIMER_H

#include <e32base.h>	// For CActive, link against: euser.lib
#include <e32std.h>		// For RTimer, link against: euser.lib
class CSchedulerTimer : public CActive
{
public:
	// Cancel and destroy
	~CSchedulerTimer();

	// Two-phased constructor.
	static CSchedulerTimer* NewL();

	// Two-phased constructor.
	static CSchedulerTimer* NewLC();

public:
	// New functions
	// Function for making the initial request
	void StartTimer(TUint aHours);

private:
	// C++ constructor
	CSchedulerTimer();

	// Second-phase constructor
	void ConstructL();

private:
	// From CActive
	// Handle completion
	void RunL();

	// How to cancel me
	void DoCancel();

	// Override to handle leaves from RunL(). Default implementation causes
	// the active scheduler to panic.
	TInt RunError(TInt aError);
	TUint iHours;
	TUint iPeriodCount;

private:

private:
	RTimer iTimer; // Provides async timing service

};

#endif // SCHEDULERTIMER_H
